/*    */ package com.alipay.api.internal.util.json;
/*    */ 
/*    */ public class JSONValidatingReader extends JSONReader {
/*  4 */   public static final Object INVALID = new Object();
/*    */   private JSONValidator validator;
/*    */   
/*    */   public JSONValidatingReader(JSONValidator validator) {
/*  8 */     this.validator = validator;
/*    */   }
/*    */   
/*    */   public JSONValidatingReader(JSONErrorListener listener) {
/* 12 */     this(new JSONValidator(listener));
/*    */   }
/*    */   
/*    */   public JSONValidatingReader() {
/* 16 */     this(new StdoutStreamErrorListener());
/*    */   }
/*    */   
/*    */   public Object read(String string) {
/* 20 */     if (!this.validator.validate(string)) return INVALID; 
/* 21 */     return super.read(string);
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Downloads\jd-gui-windows-1.6.6\jd-gui-windows-1.6.6\alipay-sdk-1.1.jar!\com\alipay\api\interna\\util\json\JSONValidatingReader.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       1.1.3
 */